Skip to content

Conversation

@aushev-dev
Copy link

No description provided.

@aushev-dev aushev-dev force-pushed the memory-optimization branch 2 times, most recently from 0e634d2 to 5448a93 Compare February 16, 2025 11:26
Copy link
Collaborator

@spajic spajic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work! ✅

- gem memory_profiler
- gem ruby-prof и отчеты callstack & qcachegrind
- gem stackprof + CLI и Speedscope
- второй thread для мониторинга памяти
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

cols = line.split(',')
```
- memory_profiler
- Вместо разделения строки на части с помощью split и проверки первого элемента, я решил использовать метод start_with?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 clever move; можно даже по первой букве определить тип строки

')
def work(file_path = 'data.txt', memory_watcher = false)
if memory_watcher
memory_watcher = MemoryWatcher.new(70)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

users_objects = users_objects + [user_object]
```
- memory_profiler
- Вместо оператора + было применено использование метода <<, который добавляет элемент в существующий массив без создания нового объекта.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work, like что не стали сразу все << во всех местах в один шаг объединять

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants